package main.java.com.negromotad.configuration;

public class TMGeneticAlgorithmConfigurator {

	private boolean preserveFirstIndividual = true; // Preserve the first
													// chromosome for use in the
													// evolution
	private int maxAllowedEvolution = 1000; // Max number of evolutions used in
											// the algorithm
	private int populationSize = 200; // Maximum number of results managed by the
										// algorithm
	private boolean minimize = false; // Minimize function
	private int maxFailureEvolutions = 150;// Maximum evolutions alowed whit out
											// results before stop
	private int sameResultEvolutions = 200;// Maximum number equals results
											// before stop

	public TMGeneticAlgorithmConfigurator() {
		super();
	};

	public TMGeneticAlgorithmConfigurator(boolean preserveFirstIndividual,
			int maxAllowedEvolution, int populationSize, boolean minimize) {
		super();
		this.preserveFirstIndividual = preserveFirstIndividual;
		this.maxAllowedEvolution = maxAllowedEvolution;
		this.populationSize = populationSize;
		this.minimize = minimize;
	}

	public boolean isPreserveFirstIndividual() {
		return preserveFirstIndividual;
	}

	public void setPreserveFirstIndividual(boolean preserveFirstIndividual) {
		this.preserveFirstIndividual = preserveFirstIndividual;
	}

	public int getMaxAllowedEvolution() {
		return maxAllowedEvolution;
	}

	public void setMaxAllowedEvolution(int maxAllowedEvolution) {
		this.maxAllowedEvolution = maxAllowedEvolution;
	}

	public int getPopulationSize() {
		return populationSize;
	}

	public void setPopulationSize(int populationSize) {
		this.populationSize = populationSize;
	}

	public boolean isMinimize() {
		return minimize;
	}

	public void setMinimize(boolean minimize) {
		this.minimize = minimize;
	}

	public int getMaxFailureEvolutions() {
		return maxFailureEvolutions;
	}

	public void setMaxFailureEvolutions(int maxFailureEvolutions) {
		this.maxFailureEvolutions = maxFailureEvolutions;
	}

	public int getSameResultEvolutions() {
		return sameResultEvolutions;
	}

	public void setSameResultEvolutions(int sameResultEvolutions) {
		this.sameResultEvolutions = sameResultEvolutions;
	}

}
